<?

set_time_limit( 30 ); 

////////////    CRONJOB   ////////////
////////////  30 * * * *  ////////////


function bindAccount( $_account_override ) {
	
	error_log ( $_account_override . " recognised. Thats a start." );
	
	include "../combustion.php";

	if( engine_get( "cron.session" ))
		$DB->query( "update settings set llog = now() where `key` = 'cron.session' && active" );
}



$dir = opendir( "../../" );

error_log ( "opendir initiated", 3 "/var/www/html/errorlog" );
	
while (false !== ( $current = readdir( $dir ))) 
	if( is_dir( $current ) && $loc = glob( "../../$current/*/.inflame" ) )
		
		bindAccount( current( $loc ));
		
	else error_log ( $current );


closedir( $dir );

?>